#pragma once

class buddy
{
public:
	buddy( __int64 id, const wstring & name, const wstring & nick )
		: id_(id)
		, nick_(nick)
		, name_(name)
	{
	}
	~buddy(void);

public:
	const wstring & name() const {
		return name_;
	}

	void name( const wstring & name ) {
		name_ = name;
	}

	__int64 id() const {
		return id_;
	}

	void id( __int64 id ) {
		id_ = id;
	}

	const wstring & nick() const {
		return nick_;
	}

	void nick( const wstring & nick ) {
		nick_ = nick;
	}

	friend bool operator==( const buddy & a, const buddy & b )
	{
		return a.id() == b.id();
	}

	friend wostream & operator<<( wostream & os, const buddy & b )
	{
		os << L"[" << lexical_cast<wstring>(b.id_) << L", " << b.name_ << L", " << b.nick_ << L"]";
		return os;
	}
private:
	__int64		id_;
	wstring		name_;
	wstring		nick_;
};

